#include <stdio.h>
#include "treehash.h"

int main(int argc, char * argv[]){
	struct st_treehash my_hash;
	struct st_treehash your_hash;
	

	treehash_init(&my_hash);
	treehash_init(&your_hash);
	treehash_sample(&my_hash, "portable_socket.c", SHA1_DIGEST);
	treehash_sample(&your_hash, "portable_socket.c.new", SHA1_DIGEST);
	treehash_cmp(&my_hash, &your_hash);
	treehash_badrun(&your_hash,  &badzero );
	printf("SHA1: %s\n", treehash_gethash(&my_hash, 0, 0));
	printf("BAD?: %s\n", treehash_get(&your_hash, "bad"));


/*
	treehash_reset(&my_hash);
	treehash_sample(&my_hash, "portable_socket.c", MD4_DIGEST);
	while(treehash_promote(&my_hash, 1) > 0){}
	printf("MD4: %s\n", treehash_gethash(&my_hash, 0, 0));

	treehash_reset(&my_hash);
	treehash_sample(&my_hash, "portable_socket.c", MD5_DIGEST);
	
	while(treehash_promote(&my_hash, 1) > 0){}
	printf("MD5: %s\n", treehash_gethash(&my_hash, 0, 0));
	treehash_free(&my_hash);
*/

	return 0;
}
